<?php
class dichvudb {
   public function Them($MaDV, $TenDV, $Gia){
       $sql = "INSERT INTO `dichvu`(`MaDV`, `TenDV`, `Gia`)"
               +"VALUES($MaDV, $TenDV, $Gia)";
   
       $data = new dataservice();
       return $data->ExecuteNoneQuery($_sql);
   }
   
   public function CapNhat($MaDV, $Gia){
       $sql = "UPDATE `dichvu` SET Gia=$Gia WHERE MaDV=$MaDV";
       
       $data = new dataservice();
       return $data->ExecuteNoneQuery($sql);
   }
   
   public function Xoa($MaDV){
       $sql = "DELETE FROM `dichvu` WHERE MaDV = $MaDV";
       
       $data = new dataservice();
       return $data->ExecuteNoneQuery($sql);
   }
   
   public function LayDanhSach(){
       $sql = "SELECT `MaDV`, `TenDV`, `Gia`"
               +"FROM `dichvu`";
       
       $data = new dataservice();
       return $data->ExecuteQuery($sql);
   }
}
?>